<template>
  <span>
    <el-button
      type="success"
      icon="el-icon-printer"
      plain
      circle
      size="mini"
      @click="print()" />
    <a title="查看明细" @click="toView">{{ data.funProcessName }}</a>
  </span>
</template>
<script>
export default {
  components: { },
  props: {
    sup_this: {
      type: Object,
      required: true
    },
    data: {
      type: Object,
      required: true
    }
  },
  methods: {
    toView() {
      const _this = this.sup_this.$refs.form
      _this.initDataOfBefore()
      _this.viewMainData(this.data.id)
    },
    print() {
      const _this = this
      _this.$confirm('确认要打印?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
      }).then(() => {
        const printForm = _this.sup_this.$refs.PrintPageForm
        printForm.loadPrintPage({ 'paramBean': this.data })
      })
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
